setFragmentResultListener

abstract fun setFragmentResultListener(@NonNull requestKey: String, @NonNull lifecycleOwner: LifecycleOwner, @NonNull listener: FragmentResultListener)(source)

Sets the FragmentResultListener for a given requestKey. Once the given LifecycleOwner is at least in the STARTED state, any results set by setFragmentResult using the same requestKey will be delivered to the callback. The callback will remain active until the LifecycleOwner reaches the DESTROYED state or clearFragmentResultListener is called with the same requestKey.

Parameters

requestKey

requestKey used to identify the result

lifecycleOwner

lifecycleOwner for handling the result

listener

listener for result changes